package ogl.tests;

import static org.junit.Assert.*;
import ogl.Army;

import org.junit.Test;

public class ArmyTest {
	
	

	@Test
	public void testArmy() {
		Army army = new Army();
		assertNotNull("Army buildings should not be null", army.buildings);
		assertNotNull("Army units should not pe null", army.units);
	}

	@Test
	public void testBuildWarfactory() {
		Army army = new Army();
		army.buildWarfactory(0, 0);
		assertNotNull("Warfactory should not be null", army.warfactory);
		assertTrue("army.buildings should contain warfactory", army.buildings.contains(army.warfactory));
	}

	@Test
	public void testBuildBaracks() {
		Army army = new Army();
		army.buildBaracks(10, 10);
		assertNotNull("baracks should not be null", army.baracks);
		assertTrue("army.buildings should contain baracks", army.buildings.contains(army.baracks));
	}

	@Test
	public void testBuildFootSoldier() {
		Army army = new Army();
		army.buildFootSoldier(20, 20);
		assertNotNull("footsoldier should not be null", army.footsoldier);
		assertTrue("army.units should contain footsoldier", army.units.contains(army.footsoldier));
	}

	@Test
	public void testBuildCommando() {
		Army army = new Army();
		army.buildCommando(21, 21);
		assertNotNull("commando should not be null", army.commando);
		assertTrue("army.units should contain commando", army.units.contains(army.commando));
	}

	@Test
	public void testBuildTank() {
		Army army = new Army();
		army.buildTank(50, 50);
		assertNotNull("tank should not be null", army.tank);
		assertTrue("army.units should contain tank", army.units.contains(army.tank));
	}

	@Test
	public void testBuildTroopCrawler() {
		Army army = new Army();
		army.buildTroopCrawler(23, 23);
		assertNotNull("troopcrawler should not be null", army.troopcrawler);
		assertTrue("army.units should contain troopcrawler", army.units.contains(army.troopcrawler));
	}

}
